<#assign path = request.getContextPath() />
<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>岗位管理</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="${path}/static/css/font.css">
        <link rel="stylesheet" href="${path}/static/css/css.css">
		<link rel="stylesheet" type="text/css" href="${path}/static/css/xadmin.css"/>
        <script src="${path}/static/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="${path}/static/js/jquery.min.js"></script>
		<script src="${path}/static/js/xadmin.js" type="text/javascript"></script>
    </head>
    
    <body>
        <div class="x-nav">
			<a href="../index">首页</a>
			<span>&gt;</span>
			<a><cite>岗位管理</cite></a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
					<div id="btns" class="btns"> 
						<button type="button" class="btn">导入</button>
						<button type="button" class="btn-w">导入模板</button>
					</div>
					
						
                    <div class="layui-card">
                        <div class="layui-card-body">
                           <form class="layui-form layui-col-space5">
							   <div class="layui-input-inline layui-show-xs-block">
							        <label for="username" class="lable">岗位名称</label>
							   </div> 
								<div class="layui-input-inline layui-show-xs-block">
									<input type="text" name="username" class="layui-input">
								</div>		
                       		
                               <div class="layui-input-inline layui-show-xs-block">
                                   <button class="layui-btn" lay-submit="" lay-filter="sreach">
                                       <i class="layui-icon">&#xe615;</i></button>
                               </div>
                           </form>
                        </div>
					
						<ul class="layui-card-body" style="overflow: hidden;border-top:1px solid #f2f2f2;">
							<li class="fl" style="width: 45%;margin-right: 20px;padding-left: 20px;">
								<form class="layui-form layui-col-space5"> 
								  
								<p style="display: block;">新增岗位</p>
								
								   <div class="layui-input-inline layui-show-xs-block mt20">
									  
										<label for="username" class="lable">岗位名称</label>
								   </div> 
									<div class="layui-input-inline layui-show-xs-block">
										<input type="text" name="username" class="layui-input">
									</div>		
								</form>
								<div class="mt20">
									<button type="button" class="btn">保存</button>
									<button type="button" class="btn-nobg">取消</button>
								</div>
							</li>
							<li style="width: 45%;margin-top: -15px;" class="layui-card-body layui-table-body layui-table-main fl">
								<table class="layui-table layui-form">
									<thead>
										<tr>
											<th>岗位名称</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										<tr>
											<td>组长</td>
											<td class="td-manage">
												<a title="禁用" href="javascript:;" disabled="disabled" class="btn-bor" onclick="member_stop()">禁用</a>
												<a title="编辑" onclick="xadmin.open('编辑','./operation/edit.html')" href="javascript:;" class="btn-bor">编辑</a>
											</td>
										</tr>
										<tr>
											<td>主任</td>
											<td class="td-manage">
												<a title="禁用" href="javascript:;" disabled="disabled" class="btn-bor" onclick="member_stop()">禁用</a>
												<a title="编辑" onclick="xadmin.open('编辑','./operation/edit.html')" href="javascript:;" class="btn-bor">编辑</a>
											</td>
										</tr>
										<tr>
											<td>书记</td>
											<td class="td-manage">
												<a title="禁用" href="javascript:;" disabled="disabled" class="btn-bor" onclick="member_stop()">禁用</a>
												<a title="编辑" onclick="xadmin.open('编辑','./operation/edit.html')" href="javascript:;" class="btn-bor">编辑</a>
											</td>
										</tr>
										<tr>
											<td>队员</td>
											<td class="td-manage">
												<a title="禁用" href="javascript:;" disabled="disabled" class="btn-bor" onclick="member_stop()">禁用</a>
												<a title="编辑" onclick="xadmin.open('编辑','./operation/edit.html')" href="javascript:;" class="btn-bor">编辑</a>
											</td>
										</tr>
									
									</tbody>
								</table>
							</li>
						</ul>
						 <div class="layui-table-page" align="center">
							<div id="layui-table-page1">
								<div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-3"><a href="javascript:;" class="layui-laypage-prev layui-disabled"
									 data-page="0"><i class="layui-icon"></i></a><span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>1</em></span><a
									 href="javascript:;" data-page="2">2</a><a href="javascript:;" data-page="3">3</a><span class="layui-laypage-spr">…</span><a
									 href="javascript:;" class="layui-laypage-last" title="尾页" data-page="300">300</a><a href="javascript:;"
									 class="layui-laypage-next" data-page="2"><i class="layui-icon"></i></a><span class="layui-laypage-skip">到第<input
										 type="text" min="1" value="1" class="layui-input">页<button type="button" class="layui-laypage-btn">确定</button></span><span
									 class="layui-laypage-count">共 300 条</span><span class="layui-laypage-limits"><select lay-ignore="">
											<option value="10" selected="">10 条/页</option>
											<option value="20">20 条/页</option>
											<option value="30">30 条/页</option>
											<option value="40">40 条/页</option>
											<option value="50">50 条/页</option>
											<option value="100">100 条/页</option>
										</select>
									</span>
								</div>
							</div>
						</div>
                </div>
				
            </div>
        </div>
	  
	<script>
		layui.use(['laydate','form'], function(){
			var laydate = layui.laydate;
			var  form = layui.form;
			// 监听全选
			form.on('checkbox(checkall)', function(data){
		
			  if(data.elem.checked){
				$('tbody input').prop('checked',true);
			  }else{
				$('tbody input').prop('checked',false);
			  }
			  form.render('checkbox');
			}); 
		  });
	
	
	
		layui.use(['laydate','form'], function(){
			var laydate = layui.laydate;
			var  form = layui.form;
			// 监听全选
			form.on('checkbox(checkall)', function(data){
	
			  if(data.elem.checked){
				$('tbody input').prop('checked',true);
			  }else{
				$('tbody input').prop('checked',false);
			  }
			  form.render('checkbox');
			}); 
		  });
	</script>
    <script>layui.use(['laydate', 'form'],
        function() {
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#start' //指定元素
            });

            //执行一个laydate实例
            laydate.render({
                elem: '#end' //指定元素
            });
        });

        /*用户-停用*/
        function member_stop(obj, id) {
            layer.confirm('确认要停用吗？',
            function(index) {

                if ($(obj).attr('title') == '启用') {

                    //发异步把用户状态进行更改
                    $(obj).attr('title', '停用');
                    $(obj).find('i').html('&#xe62f;');

                    $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
                    layer.msg('已停用!', {
                        icon: 5,
                        time: 1000
                    });

                } else {
                    $(obj).attr('title', '启用');
                    $(obj).find('i').html('&#xe601;');

                    $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
                    layer.msg('已启用!', {
                        icon: 5,
                        time: 1000
                    });
                }

            });
        }

        /*用户-删除*/
        function member_del(obj, id) {
            layer.confirm('确认要删除吗？',
            function(index) {
                //发异步删除数据
                $(obj).parents("tr").remove();
                layer.msg('已删除!', {
                    icon: 1,
                    time: 1000
                });
            });
        }

        function delAll(argument) {

            var data = tableCheck.getData();

            layer.confirm('确认要删除吗？' + data,
            function(index) {
                //捉到所有被选中的，发异步进行删除
                layer.msg('删除成功', {
                    icon: 1
                });
                $(".layui-form-checked").not('.header').parents('tr').remove();
            });
        }</script>
	</body>
</html>